<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <script>
        //window.open(url,name,features,replace);   用于打开窗口
        //url：地址 name：用于a标签等   features：显示特征（默认）  replace：是否创建新的浏览历史（必须是已经存在的窗口）

        //定义打开的网址
        var url = "http://www.baidu.com/"
        //定义打开的浏览器窗口的特性，单位是px，位置是坐标，工具条、菜单栏、滚动条、导航栏、状态栏
        var features = "height = 400, width = 800, top = 10, left = 10, toolbar =no, menubar = no, scrollbar = no, resizable = no, location = no, status = no"
        //插入超链接
        document.write('<a href = "http://sina.com.cn/" target = "newW">切换到新浪首页</a>')
        //打开新窗口
        var me = window.open(url,"newW",features);
        //规定新窗口关闭时间
        setTimeout(function(){
            me.close();
        },
        60000)//60秒后自动关闭新窗口
    </script>
</head>
<body>
    
</body>
</html>